import xadmin
from xadmin import views
from .models import *

class BaseSetting(object):
    enable_themes = True
    use_bootswatch = True
class GlobalSettings(object):
    site_title = "AYNAK EDU"
    site_footer = "深圳爱你科教育科技有限公司\t\tShenzhen Aynak Education Technology Company Limited"
    menu_style = 'accordion'

class EmailVerifyRecordAdmin(object):
    list_display = ('code','email','send_type','send_time')
    search_fields = ('code','email','send_type','send_time')
    list_filter = ('code','email','send_type','send_time')
class BannerAdmin(object):
    list_display = ('title','image','url','index','add_time')
    search_fields = ('title','image','url','index','add_time')
    list_filter = ('title','image','url','index','add_time')
xadmin.site.register(EmailVerifyRecord,EmailVerifyRecordAdmin)
xadmin.site.register(Banner,BannerAdmin)
xadmin.site.register(views.BaseAdminView,BaseSetting)
xadmin.site.register(views.CommAdminView,GlobalSettings)